import React from 'react'
// ===================================================================== Temp
import TableModal from '#cpt/temp/TableModal'
// ===================================================================== global declare
const { $fn } = window
// ===================================================================== component
class Index extends React.Component{
	state = {
		data:[],
		pag: {},
		forms : [
			{ label: '条码',		name: 'search_key',  }
		]
	}
	
	model = { }
	
	open = ({ authorzation_owner_uuid, authorzation_scene_uuid }) => {
		this.modal.open()
		this.query = { type: this.props.type || 2, authorzation_owner_uuid, authorzation_scene_uuid }
		// 
		this.fetch()
	}
	
	// paging
	fetch = () => $fn.fetch.call(this, 'conf-authorzation-record/index')
	
	// 表单
	cols = [
		{ title: '场景名称', 		dataIndex: 'use_scene_name' },
		{ title: '签名所属人', 		dataIndex: 'owner_name' },
		{ title: '授权对象', 		dataIndex: 'user_name' },
		{ title: '使用时间', 		dataIndex: 'use_at' },
		{ title: '详情',			dataIndex: 'use_content' }
	]
	
	render(){
		return TableModal.call(this,{ title: '使用记录', labelWidth:'s7', width:'90%', height:'80%', noSubmit: true})
	}
}

export default Index